const name = 'vue_tian';
const path = require('path')
function resolve(dir) {
  return path.join(__dirname, dir)
}
module.exports = {
  // lintOnSave: false,   //关闭eslint代码检测
  outputDir: 'dist_tgy_music',
  publicPath: process.env.NODE_ENV === 'production' ? './' : './',
  devServer: {
    open: true,
    host: "localhost",
    port: 8888,
    https: false,
    proxy: {
      /*请求称号*/
      '/api': {
        /*请求的接口*/
        target: 'http://localhost:9999',
        /*允许跨域*/
        changeOrigin: true,
        //url不用追加api
        pathRewrite: { '^/api': '' }
      }
    }
  },
  configureWebpack: {
    // provide the app's title in webpack's name field, so that
    // it can be accessed in index.html to inject the correct title.
    name: name,
    resolve: {
      alias: {
        '@': resolve('src'),
        '@assets':resolve('src/assets')
      }
    }
  },
}